<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
 function deleteBoard(){
	if(confirm("삭제하시겠습니까?")){
		location.href="board.do?mode=delete&no=${param.no }&category=${requestScope.bvo.category }";
	}
}
function updateBoard(){
	if(confirm("수정하시겠습니까?")){
		location.href="board.do?mode=updateView&no=${param.no }";
	}
} 


</script>
</head>
<body>
<table width = "50%" border = "1" align="center">
	<tr>
		<td width="20%">제목</td><td colspan="3">${requestScope.bvo.title }</td>
	</tr>
	<tr>
		<td width="20%">닉네임</td><td width="30%">${requestScope.bvo.memberVO.nickname }</td><td width="20%">작성일시</td><td width="30%">${requestScope.bvo.w_data }</td>
	</tr>
	<tr>
		<td width="20%">카테고리</td><td width="30%">${requestScope.bvo.category }</td><td width="20%">조회수</td><td width="30%">${requestScope.bvo.count }</td>
	</tr>
	<tr>
		<td colspan="4">
			 <pre>${requestScope.bvo.contents}</pre>
		</td>
	</tr>
	
						
	<tr>
		<td align="left" colspan="4">
			<a href="board.do?mode=list&category=${requestScope.bvo.category }">
			<img src="${initParam.root }/img/list_btn.jpg"></a> 
			
			<c:if test="${requestScope.bvo.memberVO.uId==sessionScope.mvo.uId }">
			
			<%-- <img src="${initParam.root }/img/modify_btn.jpg" alt="글수정" style="cursor:hand" id="updateBtn"> --%>
			 <img alt="수정" onclick="updateBoard()"  src="${initParam.root }/img/modify_btn.jpg">
			 <img alt="삭제" onclick="deleteBoard()" src="${initParam.root }/img/delete_btn.jpg"> 
			
			</c:if>
		</td>
	</tr>
</table>

	
</body>
</html>